package com.atgm.mall.gmmailproduct.controller;

import com.atgm.common.utils.R;
import com.atgm.mall.gmmailproduct.entity.BannerEntity;
import com.atgm.mall.gmmailproduct.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("gmmallproduct/banner")
public class BannerController {

    @Autowired
    private BannerService bannerService;

    @GetMapping("/list")
    public R getBannerList() {
        List<BannerEntity> list = bannerService.getBannerList();
        return R.ok().setData(list);
    }

}
